package com.luoqiu.myRule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 洛秋y
 * @date 2020/11/19 17:39
 */
@Configuration
public class MySelfRule {

    /**
     * 随机策略
     * @return r
     */
    @Bean
    public IRule myRule() {
        return new RandomRule();
    }
}
